package pl.vanta.utils.gui.panels;

import java.util.ArrayList;
import java.util.List;

public abstract class VListenerPanel<E> extends VPanel
{
	private static final long	serialVersionUID	= 813298383063759154L;

	protected List<E>			listeners;

	public VListenerPanel()
	{
		this.listeners = new ArrayList<E>();
	}

	public void addListener(E listener)
	{
		this.listeners.add(listener);
	}

	public boolean removeListener(E listener)
	{
		return this.listeners.remove(listener);
	}

	public void removeAllListeners()
	{
		this.listeners.clear();
	}
}